home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 028a / number.zip / NUMBER.BAT
DOS Batch File  |  1991-11-23  |  751b  |  23 lines

  1. @ECHO OFF
  2. REM This is NUMBER.BAT
  3. IF %1!==! GOTO OOPS
  4. COPY %1 BACKUP! > NUL
  5. FIND /N /V "!@#$" %1 | FIND /V "---" > %1
  6. ECHO File %1 now has line numbers
  7. GOTO END
  8. :OOPS
  9. cls
  10. ECHO   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  11. ECHO   +    This batch file numbers all the lines in a text file.    +
  12. ECHO   +    It creates a backup file called BACKUP! in case you      +
  13. ECHO   +    want the old file back without line numbers.             +
  14. ECHO   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  15. PAUSE
  16. cls
  17. ECHO.
  18. ECHO                      Enter the name of the file
  19. ECHO                    you want to add line numbers to
  20. ECHO                     after typing the word "number"
  21. @ECHO OFF
  22. :END
  23. ECHO ON